const express = require('express');
const router = express.Router();
const smartLockController = require('../controllers/smartLockController');

// 蓝牙锁设备管理
router.post('/smart-bluetooth-lock-device', smartLockController.getDeviceList);
router.post('/smart-bluetooth-lock-device-create', smartLockController.createDevice);
router.post('/smart-bluetooth-lock-record', smartLockController.getRecordList);
router.post('/smart-bluetooth-lock-type', smartLockController.getTypeList);
router.post('/smart-bluetooth-lock-open', smartLockController.openLock);
router.post('/smart-bluetooth-lock-open-create', smartLockController.createOpenLock);

// 电子钥匙相关
router.post('/smart-key-record', smartLockController.getKeyRecord);
router.post('/smart-key-open', smartLockController.openKey);
router.post('/smart-key-device', smartLockController.getKeyDevice);
router.post('/smart-key-device-key', smartLockController.getKeyDeviceKey);
router.post('/smart-key-device-core', smartLockController.getKeyDeviceCore);

// 网控器相关
router.post('/smart-controller-record', smartLockController.getControllerRecord);
router.post('/smart-controller-upgrade', smartLockController.getControllerUpgrade);
router.post('/smart-controller-open', smartLockController.openController);
router.post('/smart-controller-device', smartLockController.getControllerDevice);

// 箱柜相关
router.post('/smart-container-record', smartLockController.getContainerRecord);
router.post('/smart-container-set', smartLockController.getContainerSet);
router.post('/smart-container-open', smartLockController.openContainer);
router.post('/smart-container-device', smartLockController.getContainerDevice);
router.post('/smart-container-device-create', smartLockController.createContainerDevice);
router.post('/smart-container-status', smartLockController.getContainerStatus);

module.exports = router;